package com.tools.sqlmaker.factory;

import com.tools.sqlmaker.entry.OrgInfo;
import com.tools.sqlmaker.make.impl.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: zhoubin
 * @date: 2023/9/8
 */
public class NormalFactory implements BaseFactory {

    @Override
    public List<String> make(OrgInfo orgInfo) {
        List<String> allList = new ArrayList<>();

        GatewayBaseMaker nodeInfoSqlMaker = new NodeInfoSqlMaker(orgInfo);
        List<String> list = nodeInfoSqlMaker.sqlMake();
        allList.addAll(list);

        nodeInfoSqlMaker = new UnitInfoSqlMaker(orgInfo);
        list = nodeInfoSqlMaker.sqlMake();
        allList.addAll(list);

        nodeInfoSqlMaker = new MqMgrConfMaker(orgInfo);
        list = nodeInfoSqlMaker.sqlMake();
        allList.addAll(list);

        nodeInfoSqlMaker = new MqConfMaker(orgInfo);
        list = nodeInfoSqlMaker.sqlMake();
        allList.addAll(list);

        nodeInfoSqlMaker = new CommLinkConfMaker(orgInfo);
        list = nodeInfoSqlMaker.sqlMake();
        allList.addAll(list);

        return allList;
    }
}
